package com.javasm.sys.dao;

import com.javasm.sys.SysMenu;
import com.javasm.sys.SysRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: WangZhuang
 * @ClassName: RoleDao
 * @Description:
 * @Date: 2022/9/16 17:30
 * Version: 0.1
 * Since: JDK11
 */
public interface RoleDao {

    List<SysRole> getAllRoles();

    List<SysRole> getRoles(SysRole role);

    Integer updateRoleById(SysRole role);

    Integer insertRole(SysRole role);

    void insertAuth(@Param("roleId") Integer roleId, @Param("menuId") String menuId);

    List<Integer> getMenuList(String roleId);

    List<SysMenu> getMenuByPid(Integer menuId);

    void delMenuRole(Integer roleId);

    Integer delRoleByIds(@Param("ids") List<String> ids);
}
